package org.jeecg.modules.demo.zc.controller;

import org.jeecg.modules.demo.zc.entity.Store;
import org.jeecg.modules.demo.zc.service.StoreService;
import org.jeecg.modules.demo.zc.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2022年03月26日 19:30
 */
@RestController
@RequestMapping(value = "/store",produces = "application/json; charset=utf-8")
public class StoreController {

    @Autowired
    StoreService storeService;

    @RequestMapping("/selectAll")
    public CommonResult selectAll(){
        List<Store> storeList = storeService.selectAll();
//        System.out.println(storeList);
        if (storeList != null){
            //System.out.println(storeList);
            return new CommonResult(200,"查询销售成功",storeList);
        }else{
            return new CommonResult(404,"未查询到数据");
        }
    }

}


